# QueryInst

Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 4522;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 4522;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 4522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 4519) END FROM WidgetInst WHERE WidgetInstId = 4519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4523;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 4520) END FROM WidgetInst WHERE WidgetInstId = 4520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 4521) END FROM WidgetInst WHERE WidgetInstId = 4521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4525;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 4522) END FROM WidgetInst WHERE WidgetInstId = 4522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4526;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 4531) END FROM WidgetInst WHERE WidgetInstId = 4531) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4535;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 4532) END FROM WidgetInst WHERE WidgetInstId = 4532) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 4533) END FROM WidgetInst WHERE WidgetInstId = 4533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 4534) END FROM WidgetInst WHERE WidgetInstId = 4534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 4519) END FROM WidgetInst WHERE WidgetInstId = 4519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4543;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 4520) END FROM WidgetInst WHERE WidgetInstId = 4520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4544;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 4521) END FROM WidgetInst WHERE WidgetInstId = 4521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 4522) END FROM WidgetInst WHERE WidgetInstId = 4522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4546;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 4127) END FROM WidgetInst WHERE WidgetInstId = 4127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 4127) END FROM WidgetInst WHERE WidgetInstId = 4127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 4127) END FROM WidgetInst WHERE WidgetInstId = 4127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 4127) END FROM WidgetInst WHERE WidgetInstId = 4127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 4127) END FROM WidgetInst WHERE WidgetInstId = 4127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4579;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 4127) END FROM WidgetInst WHERE WidgetInstId = 4127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4580;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 4127) END FROM WidgetInst WHERE WidgetInstId = 4127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 4127) END FROM WidgetInst WHERE WidgetInstId = 4127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 4519) END FROM WidgetInst WHERE WidgetInstId = 4519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 4520) END FROM WidgetInst WHERE WidgetInstId = 4520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 4521) END FROM WidgetInst WHERE WidgetInstId = 4521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 4522) END FROM WidgetInst WHERE WidgetInstId = 4522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4599) END FROM WidgetInst WHERE WidgetInstId = 4599) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4603;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4600) END FROM WidgetInst WHERE WidgetInstId = 4600) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4604;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4601) END FROM WidgetInst WHERE WidgetInstId = 4601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4602) END FROM WidgetInst WHERE WidgetInstId = 4602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4606;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4599) END FROM WidgetInst WHERE WidgetInstId = 4599) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4615;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4600) END FROM WidgetInst WHERE WidgetInstId = 4600) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4616;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4601) END FROM WidgetInst WHERE WidgetInstId = 4601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4602) END FROM WidgetInst WHERE WidgetInstId = 4602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4618;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 4519) END FROM WidgetInst WHERE WidgetInstId = 4519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 4520) END FROM WidgetInst WHERE WidgetInstId = 4520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 4521) END FROM WidgetInst WHERE WidgetInstId = 4521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 4522) END FROM WidgetInst WHERE WidgetInstId = 4522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4635) END FROM WidgetInst WHERE WidgetInstId = 4635) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4639;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4636) END FROM WidgetInst WHERE WidgetInstId = 4636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4640;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4637) END FROM WidgetInst WHERE WidgetInstId = 4637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4638) END FROM WidgetInst WHERE WidgetInstId = 4638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4642;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4635) END FROM WidgetInst WHERE WidgetInstId = 4635) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4651;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4636) END FROM WidgetInst WHERE WidgetInstId = 4636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4652;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4637) END FROM WidgetInst WHERE WidgetInstId = 4637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4638) END FROM WidgetInst WHERE WidgetInstId = 4638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4654;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 4635) END FROM WidgetInst WHERE WidgetInstId = 4635) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4663;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 4636) END FROM WidgetInst WHERE WidgetInstId = 4636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4664;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 4637) END FROM WidgetInst WHERE WidgetInstId = 4637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 4638) END FROM WidgetInst WHERE WidgetInstId = 4638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4666;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4519) END FROM WidgetInst WHERE WidgetInstId = 4519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4675;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4520) END FROM WidgetInst WHERE WidgetInstId = 4520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4676;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4521) END FROM WidgetInst WHERE WidgetInstId = 4521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4522) END FROM WidgetInst WHERE WidgetInstId = 4522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4519) END FROM WidgetInst WHERE WidgetInstId = 4519) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4683) END FROM WidgetInst WHERE WidgetInstId = 4683)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4695;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4520) END FROM WidgetInst WHERE WidgetInstId = 4520) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4684) END FROM WidgetInst WHERE WidgetInstId = 4684)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4696;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4521) END FROM WidgetInst WHERE WidgetInstId = 4521) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4685) END FROM WidgetInst WHERE WidgetInstId = 4685)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4522) END FROM WidgetInst WHERE WidgetInstId = 4522) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4686) END FROM WidgetInst WHERE WidgetInstId = 4686)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4698;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4691) END FROM WidgetInst WHERE WidgetInstId = 4691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4707;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4692) END FROM WidgetInst WHERE WidgetInstId = 4692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4708;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4693) END FROM WidgetInst WHERE WidgetInstId = 4693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4709;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4694) END FROM WidgetInst WHERE WidgetInstId = 4694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4710;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4691) END FROM WidgetInst WHERE WidgetInstId = 4691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4711;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4692) END FROM WidgetInst WHERE WidgetInstId = 4692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4712;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4693) END FROM WidgetInst WHERE WidgetInstId = 4693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4713;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4694) END FROM WidgetInst WHERE WidgetInstId = 4694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4691) END FROM WidgetInst WHERE WidgetInstId = 4691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4723;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4692) END FROM WidgetInst WHERE WidgetInstId = 4692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4724;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4693) END FROM WidgetInst WHERE WidgetInstId = 4693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4725;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4694) END FROM WidgetInst WHERE WidgetInstId = 4694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4726;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4691) END FROM WidgetInst WHERE WidgetInstId = 4691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4727;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4692) END FROM WidgetInst WHERE WidgetInstId = 4692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4728;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4693) END FROM WidgetInst WHERE WidgetInstId = 4693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4694) END FROM WidgetInst WHERE WidgetInstId = 4694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4730;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4519) END FROM WidgetInst WHERE WidgetInstId = 4519) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4683) END FROM WidgetInst WHERE WidgetInstId = 4683)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4731;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4520) END FROM WidgetInst WHERE WidgetInstId = 4520) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4684) END FROM WidgetInst WHERE WidgetInstId = 4684)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4521) END FROM WidgetInst WHERE WidgetInstId = 4521) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4685) END FROM WidgetInst WHERE WidgetInstId = 4685)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4522) END FROM WidgetInst WHERE WidgetInstId = 4522) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4686) END FROM WidgetInst WHERE WidgetInstId = 4686)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4691) END FROM WidgetInst WHERE WidgetInstId = 4691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4743;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4692) END FROM WidgetInst WHERE WidgetInstId = 4692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4744;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4693) END FROM WidgetInst WHERE WidgetInstId = 4693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4745;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4694) END FROM WidgetInst WHERE WidgetInstId = 4694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4746;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4691) END FROM WidgetInst WHERE WidgetInstId = 4691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4747;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4692) END FROM WidgetInst WHERE WidgetInstId = 4692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4748;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4693) END FROM WidgetInst WHERE WidgetInstId = 4693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4749;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4694) END FROM WidgetInst WHERE WidgetInstId = 4694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4750;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4755) END FROM WidgetInst WHERE WidgetInstId = 4755) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4759;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4756) END FROM WidgetInst WHERE WidgetInstId = 4756) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4757) END FROM WidgetInst WHERE WidgetInstId = 4757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4758) END FROM WidgetInst WHERE WidgetInstId = 4758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4691) END FROM WidgetInst WHERE WidgetInstId = 4691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4692) END FROM WidgetInst WHERE WidgetInstId = 4692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4693) END FROM WidgetInst WHERE WidgetInstId = 4693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4694) END FROM WidgetInst WHERE WidgetInstId = 4694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4691) END FROM WidgetInst WHERE WidgetInstId = 4691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4692) END FROM WidgetInst WHERE WidgetInstId = 4692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4693) END FROM WidgetInst WHERE WidgetInstId = 4693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4694) END FROM WidgetInst WHERE WidgetInstId = 4694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4774;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 4755) END FROM WidgetInst WHERE WidgetInstId = 4755) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4775;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 4756) END FROM WidgetInst WHERE WidgetInstId = 4756) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 4757) END FROM WidgetInst WHERE WidgetInstId = 4757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 4758) END FROM WidgetInst WHERE WidgetInstId = 4758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4691) END FROM WidgetInst WHERE WidgetInstId = 4691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4783;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4692) END FROM WidgetInst WHERE WidgetInstId = 4692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4693) END FROM WidgetInst WHERE WidgetInstId = 4693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4694) END FROM WidgetInst WHERE WidgetInstId = 4694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4691) END FROM WidgetInst WHERE WidgetInstId = 4691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4692) END FROM WidgetInst WHERE WidgetInstId = 4692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4693) END FROM WidgetInst WHERE WidgetInstId = 4693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4694) END FROM WidgetInst WHERE WidgetInstId = 4694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4790;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 4519) END FROM WidgetInst WHERE WidgetInstId = 4519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4791;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 4520) END FROM WidgetInst WHERE WidgetInstId = 4520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 4521) END FROM WidgetInst WHERE WidgetInstId = 4521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 4522) END FROM WidgetInst WHERE WidgetInstId = 4522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4794;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 4519) END FROM WidgetInst WHERE WidgetInstId = 4519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 4520) END FROM WidgetInst WHERE WidgetInstId = 4520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4804;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 4521) END FROM WidgetInst WHERE WidgetInstId = 4521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 4522) END FROM WidgetInst WHERE WidgetInstId = 4522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4806;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4935) END FROM WidgetInst WHERE WidgetInstId = 4935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4939;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4936) END FROM WidgetInst WHERE WidgetInstId = 4936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4940;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4937) END FROM WidgetInst WHERE WidgetInstId = 4937) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4941;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4938) END FROM WidgetInst WHERE WidgetInstId = 4938) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4935) END FROM WidgetInst WHERE WidgetInstId = 4935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4947;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4936) END FROM WidgetInst WHERE WidgetInstId = 4936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4937) END FROM WidgetInst WHERE WidgetInstId = 4937) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4938) END FROM WidgetInst WHERE WidgetInstId = 4938) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4935) END FROM WidgetInst WHERE WidgetInstId = 4935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4955;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4936) END FROM WidgetInst WHERE WidgetInstId = 4936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4937) END FROM WidgetInst WHERE WidgetInstId = 4937) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4957;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4938) END FROM WidgetInst WHERE WidgetInstId = 4938) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4519) END FROM WidgetInst WHERE WidgetInstId = 4519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4963;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4520) END FROM WidgetInst WHERE WidgetInstId = 4520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4964;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4521) END FROM WidgetInst WHERE WidgetInstId = 4521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4965;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4522) END FROM WidgetInst WHERE WidgetInstId = 4522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4999) END FROM WidgetInst WHERE WidgetInstId = 4999) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5000) END FROM WidgetInst WHERE WidgetInstId = 5000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5001) END FROM WidgetInst WHERE WidgetInstId = 5001) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5005;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5002) END FROM WidgetInst WHERE WidgetInstId = 5002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5006;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4999) END FROM WidgetInst WHERE WidgetInstId = 4999) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5011;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5000) END FROM WidgetInst WHERE WidgetInstId = 5000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5001) END FROM WidgetInst WHERE WidgetInstId = 5001) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5002) END FROM WidgetInst WHERE WidgetInstId = 5002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4999) END FROM WidgetInst WHERE WidgetInstId = 4999) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5019;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5000) END FROM WidgetInst WHERE WidgetInstId = 5000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5020;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5001) END FROM WidgetInst WHERE WidgetInstId = 5001) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5002) END FROM WidgetInst WHERE WidgetInstId = 5002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 4519) END FROM WidgetInst WHERE WidgetInstId = 4519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 4520) END FROM WidgetInst WHERE WidgetInstId = 4520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5028;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 4521) END FROM WidgetInst WHERE WidgetInstId = 4521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 4522) END FROM WidgetInst WHERE WidgetInstId = 4522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5030;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5079) END FROM WidgetInst WHERE WidgetInstId = 5079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5080) END FROM WidgetInst WHERE WidgetInstId = 5080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5084;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5081) END FROM WidgetInst WHERE WidgetInstId = 5081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5085;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5082) END FROM WidgetInst WHERE WidgetInstId = 5082) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5086;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5079) END FROM WidgetInst WHERE WidgetInstId = 5079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5091;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5080) END FROM WidgetInst WHERE WidgetInstId = 5080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5092;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5081) END FROM WidgetInst WHERE WidgetInstId = 5081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5093;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5082) END FROM WidgetInst WHERE WidgetInstId = 5082) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5094;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5079) END FROM WidgetInst WHERE WidgetInstId = 5079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5099;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5080) END FROM WidgetInst WHERE WidgetInstId = 5080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5100;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5081) END FROM WidgetInst WHERE WidgetInstId = 5081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5101;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5082) END FROM WidgetInst WHERE WidgetInstId = 5082) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5102;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 4519) END FROM WidgetInst WHERE WidgetInstId = 4519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5107;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 4520) END FROM WidgetInst WHERE WidgetInstId = 4520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5108;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 4521) END FROM WidgetInst WHERE WidgetInstId = 4521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5109;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 4522) END FROM WidgetInst WHERE WidgetInstId = 4522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5110;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5159) END FROM WidgetInst WHERE WidgetInstId = 5159) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5160) END FROM WidgetInst WHERE WidgetInstId = 5160) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5161) END FROM WidgetInst WHERE WidgetInstId = 5161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5162) END FROM WidgetInst WHERE WidgetInstId = 5162) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5166;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5159) END FROM WidgetInst WHERE WidgetInstId = 5159) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5160) END FROM WidgetInst WHERE WidgetInstId = 5160) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5172;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5161) END FROM WidgetInst WHERE WidgetInstId = 5161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5162) END FROM WidgetInst WHERE WidgetInstId = 5162) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5159) END FROM WidgetInst WHERE WidgetInstId = 5159) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5179;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5160) END FROM WidgetInst WHERE WidgetInstId = 5160) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5180;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5161) END FROM WidgetInst WHERE WidgetInstId = 5161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5181;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5162) END FROM WidgetInst WHERE WidgetInstId = 5162) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5182;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5183) END FROM WidgetInst WHERE WidgetInstId = 5183) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5159) END FROM WidgetInst WHERE WidgetInstId = 5159)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5184) END FROM WidgetInst WHERE WidgetInstId = 5184) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5160) END FROM WidgetInst WHERE WidgetInstId = 5160)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5188;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5185) END FROM WidgetInst WHERE WidgetInstId = 5185) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5161) END FROM WidgetInst WHERE WidgetInstId = 5161)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5189;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5186) END FROM WidgetInst WHERE WidgetInstId = 5186) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5162) END FROM WidgetInst WHERE WidgetInstId = 5162)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5190;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5183) END FROM WidgetInst WHERE WidgetInstId = 5183) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5159) END FROM WidgetInst WHERE WidgetInstId = 5159)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5184) END FROM WidgetInst WHERE WidgetInstId = 5184) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5160) END FROM WidgetInst WHERE WidgetInstId = 5160)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5185) END FROM WidgetInst WHERE WidgetInstId = 5185) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5161) END FROM WidgetInst WHERE WidgetInstId = 5161)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5186) END FROM WidgetInst WHERE WidgetInstId = 5186) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5162) END FROM WidgetInst WHERE WidgetInstId = 5162)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5198;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5183) END FROM WidgetInst WHERE WidgetInstId = 5183) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5159) END FROM WidgetInst WHERE WidgetInstId = 5159)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5184) END FROM WidgetInst WHERE WidgetInstId = 5184) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5160) END FROM WidgetInst WHERE WidgetInstId = 5160)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5204;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5185) END FROM WidgetInst WHERE WidgetInstId = 5185) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5161) END FROM WidgetInst WHERE WidgetInstId = 5161)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5186) END FROM WidgetInst WHERE WidgetInstId = 5186) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5162) END FROM WidgetInst WHERE WidgetInstId = 5162)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 4519) END FROM WidgetInst WHERE WidgetInstId = 4519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5211;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 4520) END FROM WidgetInst WHERE WidgetInstId = 4520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5212;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 4521) END FROM WidgetInst WHERE WidgetInstId = 4521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 4522) END FROM WidgetInst WHERE WidgetInstId = 4522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5214;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5219) END FROM WidgetInst WHERE WidgetInstId = 5219) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5223;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5220) END FROM WidgetInst WHERE WidgetInstId = 5220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5224;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5221) END FROM WidgetInst WHERE WidgetInstId = 5221) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5225;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5222) END FROM WidgetInst WHERE WidgetInstId = 5222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5226;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5219) END FROM WidgetInst WHERE WidgetInstId = 5219) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5235;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5220) END FROM WidgetInst WHERE WidgetInstId = 5220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5236;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5221) END FROM WidgetInst WHERE WidgetInstId = 5221) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5222) END FROM WidgetInst WHERE WidgetInstId = 5222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5238;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5219) END FROM WidgetInst WHERE WidgetInstId = 5219) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5247;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5220) END FROM WidgetInst WHERE WidgetInstId = 5220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5248;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5221) END FROM WidgetInst WHERE WidgetInstId = 5221) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5222) END FROM WidgetInst WHERE WidgetInstId = 5222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5250;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 5219) END FROM WidgetInst WHERE WidgetInstId = 5219) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5291;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 5220) END FROM WidgetInst WHERE WidgetInstId = 5220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5292;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 5221) END FROM WidgetInst WHERE WidgetInstId = 5221) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 5222) END FROM WidgetInst WHERE WidgetInstId = 5222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5294;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 4519) END FROM WidgetInst WHERE WidgetInstId = 4519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 4520) END FROM WidgetInst WHERE WidgetInstId = 4520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5304;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 4521) END FROM WidgetInst WHERE WidgetInstId = 4521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 4522) END FROM WidgetInst WHERE WidgetInstId = 4522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5306;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5315) END FROM WidgetInst WHERE WidgetInstId = 5315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5319;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5316) END FROM WidgetInst WHERE WidgetInstId = 5316) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5320;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5317) END FROM WidgetInst WHERE WidgetInstId = 5317) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5321;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5318) END FROM WidgetInst WHERE WidgetInstId = 5318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5315) END FROM WidgetInst WHERE WidgetInstId = 5315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5331;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5316) END FROM WidgetInst WHERE WidgetInstId = 5316) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5332;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5317) END FROM WidgetInst WHERE WidgetInstId = 5317) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5333;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5318) END FROM WidgetInst WHERE WidgetInstId = 5318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5334;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5315) END FROM WidgetInst WHERE WidgetInstId = 5315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5316) END FROM WidgetInst WHERE WidgetInstId = 5316) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5344;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5317) END FROM WidgetInst WHERE WidgetInstId = 5317) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5345;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5318) END FROM WidgetInst WHERE WidgetInstId = 5318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 5315) END FROM WidgetInst WHERE WidgetInstId = 5315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 5316) END FROM WidgetInst WHERE WidgetInstId = 5316) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5388;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 5317) END FROM WidgetInst WHERE WidgetInstId = 5317) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5389;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 5318) END FROM WidgetInst WHERE WidgetInstId = 5318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5390;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 5403) END FROM WidgetInst WHERE WidgetInstId = 5403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 5404) END FROM WidgetInst WHERE WidgetInstId = 5404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 5405) END FROM WidgetInst WHERE WidgetInstId = 5405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 5406) END FROM WidgetInst WHERE WidgetInstId = 5406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5403) END FROM WidgetInst WHERE WidgetInstId = 5403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5404) END FROM WidgetInst WHERE WidgetInstId = 5404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5405) END FROM WidgetInst WHERE WidgetInstId = 5405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5406) END FROM WidgetInst WHERE WidgetInstId = 5406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5403) END FROM WidgetInst WHERE WidgetInstId = 5403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5404) END FROM WidgetInst WHERE WidgetInstId = 5404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5405) END FROM WidgetInst WHERE WidgetInstId = 5405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5406) END FROM WidgetInst WHERE WidgetInstId = 5406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5403) END FROM WidgetInst WHERE WidgetInstId = 5403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5404) END FROM WidgetInst WHERE WidgetInstId = 5404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5405) END FROM WidgetInst WHERE WidgetInstId = 5405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5406) END FROM WidgetInst WHERE WidgetInstId = 5406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5434;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5403) END FROM WidgetInst WHERE WidgetInstId = 5403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5404) END FROM WidgetInst WHERE WidgetInstId = 5404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5440;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5405) END FROM WidgetInst WHERE WidgetInstId = 5405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5441;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5406) END FROM WidgetInst WHERE WidgetInstId = 5406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5442;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5403) END FROM WidgetInst WHERE WidgetInstId = 5403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5404) END FROM WidgetInst WHERE WidgetInstId = 5404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5405) END FROM WidgetInst WHERE WidgetInstId = 5405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5449;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5406) END FROM WidgetInst WHERE WidgetInstId = 5406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 4519) END FROM WidgetInst WHERE WidgetInstId = 4519) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 4130) END FROM WidgetInst WHERE WidgetInstId = 4130)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5455;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 4520) END FROM WidgetInst WHERE WidgetInstId = 4520) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 4130) END FROM WidgetInst WHERE WidgetInstId = 4130)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 4521) END FROM WidgetInst WHERE WidgetInstId = 4521) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 4130) END FROM WidgetInst WHERE WidgetInstId = 4130)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5457;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 4522) END FROM WidgetInst WHERE WidgetInstId = 4522) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 4130) END FROM WidgetInst WHERE WidgetInstId = 4130)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5458;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 5463) END FROM WidgetInst WHERE WidgetInstId = 5463) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5467;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 5464) END FROM WidgetInst WHERE WidgetInstId = 5464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5468;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 5465) END FROM WidgetInst WHERE WidgetInstId = 5465) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5469;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 5466) END FROM WidgetInst WHERE WidgetInstId = 5466) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5470;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 5477;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 5477;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 5477;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 5477;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 5477;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 5477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 5477) END FROM WidgetInst WHERE WidgetInstId = 5477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5478;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 5480) END FROM WidgetInst WHERE WidgetInstId = 5480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 5477) END FROM WidgetInst WHERE WidgetInstId = 5477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5483;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 4127) END FROM WidgetInst WHERE WidgetInstId = 4127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5489;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 4127) END FROM WidgetInst WHERE WidgetInstId = 4127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 5477) END FROM WidgetInst WHERE WidgetInstId = 5477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5497) END FROM WidgetInst WHERE WidgetInstId = 5497) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5498;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5497) END FROM WidgetInst WHERE WidgetInstId = 5497) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5501;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 5477) END FROM WidgetInst WHERE WidgetInstId = 5477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5504;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5506) END FROM WidgetInst WHERE WidgetInstId = 5506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5506) END FROM WidgetInst WHERE WidgetInstId = 5506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5506) END FROM WidgetInst WHERE WidgetInstId = 5506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5513;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5477) END FROM WidgetInst WHERE WidgetInstId = 5477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5516;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5477) END FROM WidgetInst WHERE WidgetInstId = 5477) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5518) END FROM WidgetInst WHERE WidgetInstId = 5518)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5521;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5520) END FROM WidgetInst WHERE WidgetInstId = 5520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5520) END FROM WidgetInst WHERE WidgetInstId = 5520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5525;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5520) END FROM WidgetInst WHERE WidgetInstId = 5520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5528;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5520) END FROM WidgetInst WHERE WidgetInstId = 5520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5529;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5477) END FROM WidgetInst WHERE WidgetInstId = 5477) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5518) END FROM WidgetInst WHERE WidgetInstId = 5518)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5520) END FROM WidgetInst WHERE WidgetInstId = 5520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5520) END FROM WidgetInst WHERE WidgetInstId = 5520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5536) END FROM WidgetInst WHERE WidgetInstId = 5536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5520) END FROM WidgetInst WHERE WidgetInstId = 5520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5520) END FROM WidgetInst WHERE WidgetInstId = 5520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5536) END FROM WidgetInst WHERE WidgetInstId = 5536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5520) END FROM WidgetInst WHERE WidgetInstId = 5520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5543;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5520) END FROM WidgetInst WHERE WidgetInstId = 5520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5544;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 5477) END FROM WidgetInst WHERE WidgetInstId = 5477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 5477) END FROM WidgetInst WHERE WidgetInstId = 5477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5581) END FROM WidgetInst WHERE WidgetInstId = 5581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5581) END FROM WidgetInst WHERE WidgetInstId = 5581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5581) END FROM WidgetInst WHERE WidgetInstId = 5581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5586;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5477) END FROM WidgetInst WHERE WidgetInstId = 5477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5588;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5597) END FROM WidgetInst WHERE WidgetInstId = 5597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5598;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5597) END FROM WidgetInst WHERE WidgetInstId = 5597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5600;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5597) END FROM WidgetInst WHERE WidgetInstId = 5597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5602;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 5477) END FROM WidgetInst WHERE WidgetInstId = 5477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5604;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5617) END FROM WidgetInst WHERE WidgetInstId = 5617) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5618;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5617) END FROM WidgetInst WHERE WidgetInstId = 5617) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5617) END FROM WidgetInst WHERE WidgetInstId = 5617) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5622;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 5477) END FROM WidgetInst WHERE WidgetInstId = 5477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5624;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5637) END FROM WidgetInst WHERE WidgetInstId = 5637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5637) END FROM WidgetInst WHERE WidgetInstId = 5637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5640;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5637) END FROM WidgetInst WHERE WidgetInstId = 5637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5642;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5643) END FROM WidgetInst WHERE WidgetInstId = 5643) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5637) END FROM WidgetInst WHERE WidgetInstId = 5637)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5643) END FROM WidgetInst WHERE WidgetInstId = 5643) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5637) END FROM WidgetInst WHERE WidgetInstId = 5637)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5646;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5643) END FROM WidgetInst WHERE WidgetInstId = 5643) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5637) END FROM WidgetInst WHERE WidgetInstId = 5637)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5648;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 5477) END FROM WidgetInst WHERE WidgetInstId = 5477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5650;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5652) END FROM WidgetInst WHERE WidgetInstId = 5652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5652) END FROM WidgetInst WHERE WidgetInstId = 5652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5652) END FROM WidgetInst WHERE WidgetInstId = 5652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 5652) END FROM WidgetInst WHERE WidgetInstId = 5652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5670;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 5477) END FROM WidgetInst WHERE WidgetInstId = 5477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5673;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5676) END FROM WidgetInst WHERE WidgetInstId = 5676) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5676) END FROM WidgetInst WHERE WidgetInstId = 5676) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5676) END FROM WidgetInst WHERE WidgetInstId = 5676) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 5676) END FROM WidgetInst WHERE WidgetInstId = 5676) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5694;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5699;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5701;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5703;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5705;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5707;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5698) END FROM WidgetInst WHERE WidgetInstId = 5698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5709;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 5477) END FROM WidgetInst WHERE WidgetInstId = 5477) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 4130) END FROM WidgetInst WHERE WidgetInstId = 4130)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5711;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 5713) END FROM WidgetInst WHERE WidgetInstId = 5713) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 5744) END FROM WidgetInst WHERE WidgetInstId = 5744) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5745;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 5744) END FROM WidgetInst WHERE WidgetInstId = 5744) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5747;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 5757) END FROM WidgetInst WHERE WidgetInstId = 5757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 5759) END FROM WidgetInst WHERE WidgetInstId = 5759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 5757) END FROM WidgetInst WHERE WidgetInstId = 5757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 5759) END FROM WidgetInst WHERE WidgetInstId = 5759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5757) END FROM WidgetInst WHERE WidgetInstId = 5757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5775;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5759) END FROM WidgetInst WHERE WidgetInstId = 5759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5757) END FROM WidgetInst WHERE WidgetInstId = 5757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5781;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5759) END FROM WidgetInst WHERE WidgetInstId = 5759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5783;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5757) END FROM WidgetInst WHERE WidgetInstId = 5757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5759) END FROM WidgetInst WHERE WidgetInstId = 5759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5791;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 5757) END FROM WidgetInst WHERE WidgetInstId = 5757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 5759) END FROM WidgetInst WHERE WidgetInstId = 5759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 5757) END FROM WidgetInst WHERE WidgetInstId = 5757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 5759) END FROM WidgetInst WHERE WidgetInstId = 5759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5801;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5811;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5813;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5817;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 5752) END FROM WidgetInst WHERE WidgetInstId = 5752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 5836) END FROM WidgetInst WHERE WidgetInstId = 5836) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 5846) END FROM WidgetInst WHERE WidgetInstId = 5846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5847;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 5849) END FROM WidgetInst WHERE WidgetInstId = 5849) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5850;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 5854) END FROM WidgetInst WHERE WidgetInstId = 5854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 5854) END FROM WidgetInst WHERE WidgetInstId = 5854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5857;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 5846) END FROM WidgetInst WHERE WidgetInstId = 5846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5872;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 5886;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 5886;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 5886;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 5886;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 5886;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 5886;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 5886) END FROM WidgetInst WHERE WidgetInstId = 5886) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5887;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 5889) END FROM WidgetInst WHERE WidgetInstId = 5889) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5890;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 5886) END FROM WidgetInst WHERE WidgetInstId = 5886) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5892;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5898;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5901;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 5886) END FROM WidgetInst WHERE WidgetInstId = 5886) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5904;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5906) END FROM WidgetInst WHERE WidgetInstId = 5906) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5907;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5906) END FROM WidgetInst WHERE WidgetInstId = 5906) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5910;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 5886) END FROM WidgetInst WHERE WidgetInstId = 5886) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5913;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5915) END FROM WidgetInst WHERE WidgetInstId = 5915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5916;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5915) END FROM WidgetInst WHERE WidgetInstId = 5915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5919;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5915) END FROM WidgetInst WHERE WidgetInstId = 5915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5922;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5886) END FROM WidgetInst WHERE WidgetInstId = 5886) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5925;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5886) END FROM WidgetInst WHERE WidgetInstId = 5886) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5927) END FROM WidgetInst WHERE WidgetInstId = 5927)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5930;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5929) END FROM WidgetInst WHERE WidgetInstId = 5929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5929) END FROM WidgetInst WHERE WidgetInstId = 5929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5929) END FROM WidgetInst WHERE WidgetInstId = 5929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5929) END FROM WidgetInst WHERE WidgetInstId = 5929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5938;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5886) END FROM WidgetInst WHERE WidgetInstId = 5886) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5927) END FROM WidgetInst WHERE WidgetInstId = 5927)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5939;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5929) END FROM WidgetInst WHERE WidgetInstId = 5929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5929) END FROM WidgetInst WHERE WidgetInstId = 5929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5943;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5945) END FROM WidgetInst WHERE WidgetInstId = 5945) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5946;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5929) END FROM WidgetInst WHERE WidgetInstId = 5929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5929) END FROM WidgetInst WHERE WidgetInstId = 5929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5945) END FROM WidgetInst WHERE WidgetInstId = 5945) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5929) END FROM WidgetInst WHERE WidgetInstId = 5929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5929) END FROM WidgetInst WHERE WidgetInstId = 5929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5953;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 5886) END FROM WidgetInst WHERE WidgetInstId = 5886) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5954;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 5886) END FROM WidgetInst WHERE WidgetInstId = 5886) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5957;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5990) END FROM WidgetInst WHERE WidgetInstId = 5990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5990) END FROM WidgetInst WHERE WidgetInstId = 5990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5993;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5990) END FROM WidgetInst WHERE WidgetInstId = 5990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5995;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5886) END FROM WidgetInst WHERE WidgetInstId = 5886) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5997;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6006) END FROM WidgetInst WHERE WidgetInstId = 6006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6007;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6006) END FROM WidgetInst WHERE WidgetInstId = 6006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6009;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6006) END FROM WidgetInst WHERE WidgetInstId = 6006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6011;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 5886) END FROM WidgetInst WHERE WidgetInstId = 5886) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6026) END FROM WidgetInst WHERE WidgetInstId = 6026) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6026) END FROM WidgetInst WHERE WidgetInstId = 6026) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6026) END FROM WidgetInst WHERE WidgetInstId = 6026) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 5886) END FROM WidgetInst WHERE WidgetInstId = 5886) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6046) END FROM WidgetInst WHERE WidgetInstId = 6046) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6046) END FROM WidgetInst WHERE WidgetInstId = 6046) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6046) END FROM WidgetInst WHERE WidgetInstId = 6046) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6051;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6052) END FROM WidgetInst WHERE WidgetInstId = 6052) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6046) END FROM WidgetInst WHERE WidgetInstId = 6046)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6053;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6052) END FROM WidgetInst WHERE WidgetInstId = 6052) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6046) END FROM WidgetInst WHERE WidgetInstId = 6046)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6052) END FROM WidgetInst WHERE WidgetInstId = 6052) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6046) END FROM WidgetInst WHERE WidgetInstId = 6046)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 5886) END FROM WidgetInst WHERE WidgetInstId = 5886) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6061) END FROM WidgetInst WHERE WidgetInstId = 6061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6062;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6061) END FROM WidgetInst WHERE WidgetInstId = 6061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6061) END FROM WidgetInst WHERE WidgetInstId = 6061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6068;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6061) END FROM WidgetInst WHERE WidgetInstId = 6061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6079;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 5886) END FROM WidgetInst WHERE WidgetInstId = 5886) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6082;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6085) END FROM WidgetInst WHERE WidgetInstId = 6085) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6086;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6085) END FROM WidgetInst WHERE WidgetInstId = 6085) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6089;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6085) END FROM WidgetInst WHERE WidgetInstId = 6085) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6092;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6085) END FROM WidgetInst WHERE WidgetInstId = 6085) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6103;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 6107) END FROM WidgetInst WHERE WidgetInstId = 6107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6108;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 6107) END FROM WidgetInst WHERE WidgetInstId = 6107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6110;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 6107) END FROM WidgetInst WHERE WidgetInstId = 6107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6112;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 6107) END FROM WidgetInst WHERE WidgetInstId = 6107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6114;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 6107) END FROM WidgetInst WHERE WidgetInstId = 6107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6116;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 6107) END FROM WidgetInst WHERE WidgetInstId = 6107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6118;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6120;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 6122) END FROM WidgetInst WHERE WidgetInstId = 6122) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6123;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 6133;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 6133;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 6133;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 6133;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 6133;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 6133;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 6134;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 6134;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 6134;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 6134;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 6134;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 6134;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 6135;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 6135;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 6135;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 6135;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 6135;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 6135;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 6136;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 6136;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 6136;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 6136;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 6136;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 6136;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6137;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 6134) END FROM WidgetInst WHERE WidgetInstId = 6134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 6135) END FROM WidgetInst WHERE WidgetInstId = 6135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6139;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 6136) END FROM WidgetInst WHERE WidgetInstId = 6136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6140;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 6145) END FROM WidgetInst WHERE WidgetInstId = 6145) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6149;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 6146) END FROM WidgetInst WHERE WidgetInstId = 6146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6150;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 6147) END FROM WidgetInst WHERE WidgetInstId = 6147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6151;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 6148) END FROM WidgetInst WHERE WidgetInstId = 6148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6157;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 6134) END FROM WidgetInst WHERE WidgetInstId = 6134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 6135) END FROM WidgetInst WHERE WidgetInstId = 6135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 6136) END FROM WidgetInst WHERE WidgetInstId = 6136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6160;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 5741) END FROM WidgetInst WHERE WidgetInstId = 5741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6181;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 5741) END FROM WidgetInst WHERE WidgetInstId = 5741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6182;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 5741) END FROM WidgetInst WHERE WidgetInstId = 5741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 5741) END FROM WidgetInst WHERE WidgetInstId = 5741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6184;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 5741) END FROM WidgetInst WHERE WidgetInstId = 5741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 5741) END FROM WidgetInst WHERE WidgetInstId = 5741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 5741) END FROM WidgetInst WHERE WidgetInstId = 5741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 5741) END FROM WidgetInst WHERE WidgetInstId = 5741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 6134) END FROM WidgetInst WHERE WidgetInstId = 6134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 6135) END FROM WidgetInst WHERE WidgetInstId = 6135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 6136) END FROM WidgetInst WHERE WidgetInstId = 6136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6208;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6213) END FROM WidgetInst WHERE WidgetInstId = 6213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6214) END FROM WidgetInst WHERE WidgetInstId = 6214) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6218;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6215) END FROM WidgetInst WHERE WidgetInstId = 6215) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6216) END FROM WidgetInst WHERE WidgetInstId = 6216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6220;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6213) END FROM WidgetInst WHERE WidgetInstId = 6213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6229;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6214) END FROM WidgetInst WHERE WidgetInstId = 6214) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6230;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6215) END FROM WidgetInst WHERE WidgetInstId = 6215) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6231;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6216) END FROM WidgetInst WHERE WidgetInstId = 6216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6232;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 6134) END FROM WidgetInst WHERE WidgetInstId = 6134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6242;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 6135) END FROM WidgetInst WHERE WidgetInstId = 6135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 6136) END FROM WidgetInst WHERE WidgetInstId = 6136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6244;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6249) END FROM WidgetInst WHERE WidgetInstId = 6249) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6250) END FROM WidgetInst WHERE WidgetInstId = 6250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6251) END FROM WidgetInst WHERE WidgetInstId = 6251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6252) END FROM WidgetInst WHERE WidgetInstId = 6252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6256;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6249) END FROM WidgetInst WHERE WidgetInstId = 6249) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6250) END FROM WidgetInst WHERE WidgetInstId = 6250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6266;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6251) END FROM WidgetInst WHERE WidgetInstId = 6251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6267;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6252) END FROM WidgetInst WHERE WidgetInstId = 6252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6268;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 6249) END FROM WidgetInst WHERE WidgetInstId = 6249) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6277;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 6250) END FROM WidgetInst WHERE WidgetInstId = 6250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6278;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 6251) END FROM WidgetInst WHERE WidgetInstId = 6251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 6252) END FROM WidgetInst WHERE WidgetInstId = 6252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6280;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6289;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 6134) END FROM WidgetInst WHERE WidgetInstId = 6134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6290;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 6135) END FROM WidgetInst WHERE WidgetInstId = 6135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6291;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 6136) END FROM WidgetInst WHERE WidgetInstId = 6136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6292;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6297) END FROM WidgetInst WHERE WidgetInstId = 6297)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6309;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 6134) END FROM WidgetInst WHERE WidgetInstId = 6134) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6298) END FROM WidgetInst WHERE WidgetInstId = 6298)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6310;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 6135) END FROM WidgetInst WHERE WidgetInstId = 6135) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6299) END FROM WidgetInst WHERE WidgetInstId = 6299)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 6136) END FROM WidgetInst WHERE WidgetInstId = 6136) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6300) END FROM WidgetInst WHERE WidgetInstId = 6300)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6312;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6305) END FROM WidgetInst WHERE WidgetInstId = 6305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6321;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6306) END FROM WidgetInst WHERE WidgetInstId = 6306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6307) END FROM WidgetInst WHERE WidgetInstId = 6307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6308) END FROM WidgetInst WHERE WidgetInstId = 6308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6324;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6305) END FROM WidgetInst WHERE WidgetInstId = 6305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6325;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6306) END FROM WidgetInst WHERE WidgetInstId = 6306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6326;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6307) END FROM WidgetInst WHERE WidgetInstId = 6307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6327;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6308) END FROM WidgetInst WHERE WidgetInstId = 6308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6328;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6305) END FROM WidgetInst WHERE WidgetInstId = 6305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6337;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6306) END FROM WidgetInst WHERE WidgetInstId = 6306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6338;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6307) END FROM WidgetInst WHERE WidgetInstId = 6307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6339;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6308) END FROM WidgetInst WHERE WidgetInstId = 6308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6305) END FROM WidgetInst WHERE WidgetInstId = 6305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6341;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6306) END FROM WidgetInst WHERE WidgetInstId = 6306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6342;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6307) END FROM WidgetInst WHERE WidgetInstId = 6307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6308) END FROM WidgetInst WHERE WidgetInstId = 6308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6344;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6297) END FROM WidgetInst WHERE WidgetInstId = 6297)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6345;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 6134) END FROM WidgetInst WHERE WidgetInstId = 6134) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6298) END FROM WidgetInst WHERE WidgetInstId = 6298)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 6135) END FROM WidgetInst WHERE WidgetInstId = 6135) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6299) END FROM WidgetInst WHERE WidgetInstId = 6299)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6347;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 6136) END FROM WidgetInst WHERE WidgetInstId = 6136) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6300) END FROM WidgetInst WHERE WidgetInstId = 6300)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6348;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6305) END FROM WidgetInst WHERE WidgetInstId = 6305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6357;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6306) END FROM WidgetInst WHERE WidgetInstId = 6306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6358;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6307) END FROM WidgetInst WHERE WidgetInstId = 6307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6308) END FROM WidgetInst WHERE WidgetInstId = 6308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6360;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6305) END FROM WidgetInst WHERE WidgetInstId = 6305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6306) END FROM WidgetInst WHERE WidgetInstId = 6306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6307) END FROM WidgetInst WHERE WidgetInstId = 6307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6363;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6308) END FROM WidgetInst WHERE WidgetInstId = 6308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6369) END FROM WidgetInst WHERE WidgetInstId = 6369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6370) END FROM WidgetInst WHERE WidgetInstId = 6370) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6371) END FROM WidgetInst WHERE WidgetInstId = 6371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6372) END FROM WidgetInst WHERE WidgetInstId = 6372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6305) END FROM WidgetInst WHERE WidgetInstId = 6305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6306) END FROM WidgetInst WHERE WidgetInstId = 6306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6307) END FROM WidgetInst WHERE WidgetInstId = 6307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6383;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6308) END FROM WidgetInst WHERE WidgetInstId = 6308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6305) END FROM WidgetInst WHERE WidgetInstId = 6305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6306) END FROM WidgetInst WHERE WidgetInstId = 6306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6386;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6307) END FROM WidgetInst WHERE WidgetInstId = 6307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6308) END FROM WidgetInst WHERE WidgetInstId = 6308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6388;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 6369) END FROM WidgetInst WHERE WidgetInstId = 6369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6389;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 6370) END FROM WidgetInst WHERE WidgetInstId = 6370) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6390;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 6371) END FROM WidgetInst WHERE WidgetInstId = 6371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6391;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 6372) END FROM WidgetInst WHERE WidgetInstId = 6372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6392;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6305) END FROM WidgetInst WHERE WidgetInstId = 6305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6306) END FROM WidgetInst WHERE WidgetInstId = 6306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6307) END FROM WidgetInst WHERE WidgetInstId = 6307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6308) END FROM WidgetInst WHERE WidgetInstId = 6308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6305) END FROM WidgetInst WHERE WidgetInstId = 6305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6306) END FROM WidgetInst WHERE WidgetInstId = 6306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6307) END FROM WidgetInst WHERE WidgetInstId = 6307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6308) END FROM WidgetInst WHERE WidgetInstId = 6308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 6134) END FROM WidgetInst WHERE WidgetInstId = 6134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 6135) END FROM WidgetInst WHERE WidgetInstId = 6135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 6136) END FROM WidgetInst WHERE WidgetInstId = 6136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 6134) END FROM WidgetInst WHERE WidgetInstId = 6134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 6135) END FROM WidgetInst WHERE WidgetInstId = 6135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 6136) END FROM WidgetInst WHERE WidgetInstId = 6136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6549) END FROM WidgetInst WHERE WidgetInstId = 6549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6550) END FROM WidgetInst WHERE WidgetInstId = 6550) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6551) END FROM WidgetInst WHERE WidgetInstId = 6551) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6552) END FROM WidgetInst WHERE WidgetInstId = 6552) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6549) END FROM WidgetInst WHERE WidgetInstId = 6549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6561;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6550) END FROM WidgetInst WHERE WidgetInstId = 6550) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6551) END FROM WidgetInst WHERE WidgetInstId = 6551) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6552) END FROM WidgetInst WHERE WidgetInstId = 6552) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6549) END FROM WidgetInst WHERE WidgetInstId = 6549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6550) END FROM WidgetInst WHERE WidgetInstId = 6550) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6551) END FROM WidgetInst WHERE WidgetInstId = 6551) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6552) END FROM WidgetInst WHERE WidgetInstId = 6552) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6134) END FROM WidgetInst WHERE WidgetInstId = 6134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6135) END FROM WidgetInst WHERE WidgetInstId = 6135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6579;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6136) END FROM WidgetInst WHERE WidgetInstId = 6136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6580;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6613) END FROM WidgetInst WHERE WidgetInstId = 6613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6614) END FROM WidgetInst WHERE WidgetInstId = 6614) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6618;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6615) END FROM WidgetInst WHERE WidgetInstId = 6615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6619;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6616) END FROM WidgetInst WHERE WidgetInstId = 6616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6613) END FROM WidgetInst WHERE WidgetInstId = 6613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6614) END FROM WidgetInst WHERE WidgetInstId = 6614) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6615) END FROM WidgetInst WHERE WidgetInstId = 6615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6616) END FROM WidgetInst WHERE WidgetInstId = 6616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6613) END FROM WidgetInst WHERE WidgetInstId = 6613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6633;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6614) END FROM WidgetInst WHERE WidgetInstId = 6614) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6634;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6615) END FROM WidgetInst WHERE WidgetInstId = 6615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6616) END FROM WidgetInst WHERE WidgetInstId = 6616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6636;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 6134) END FROM WidgetInst WHERE WidgetInstId = 6134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6642;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 6135) END FROM WidgetInst WHERE WidgetInstId = 6135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 6136) END FROM WidgetInst WHERE WidgetInstId = 6136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6693) END FROM WidgetInst WHERE WidgetInstId = 6693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6694) END FROM WidgetInst WHERE WidgetInstId = 6694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6698;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6695) END FROM WidgetInst WHERE WidgetInstId = 6695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6699;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6696) END FROM WidgetInst WHERE WidgetInstId = 6696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6700;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6693) END FROM WidgetInst WHERE WidgetInstId = 6693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6705;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6694) END FROM WidgetInst WHERE WidgetInstId = 6694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6695) END FROM WidgetInst WHERE WidgetInstId = 6695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6707;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6696) END FROM WidgetInst WHERE WidgetInstId = 6696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6708;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6693) END FROM WidgetInst WHERE WidgetInstId = 6693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6713;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6694) END FROM WidgetInst WHERE WidgetInstId = 6694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6695) END FROM WidgetInst WHERE WidgetInstId = 6695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6696) END FROM WidgetInst WHERE WidgetInstId = 6696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6716;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6721;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 6134) END FROM WidgetInst WHERE WidgetInstId = 6134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6722;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 6135) END FROM WidgetInst WHERE WidgetInstId = 6135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6723;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 6136) END FROM WidgetInst WHERE WidgetInstId = 6136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6724;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6773) END FROM WidgetInst WHERE WidgetInstId = 6773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6774) END FROM WidgetInst WHERE WidgetInstId = 6774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6775) END FROM WidgetInst WHERE WidgetInstId = 6775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6776) END FROM WidgetInst WHERE WidgetInstId = 6776) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6780;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6773) END FROM WidgetInst WHERE WidgetInstId = 6773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6774) END FROM WidgetInst WHERE WidgetInstId = 6774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6775) END FROM WidgetInst WHERE WidgetInstId = 6775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6776) END FROM WidgetInst WHERE WidgetInstId = 6776) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6773) END FROM WidgetInst WHERE WidgetInstId = 6773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6774) END FROM WidgetInst WHERE WidgetInstId = 6774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6794;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6775) END FROM WidgetInst WHERE WidgetInstId = 6775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6776) END FROM WidgetInst WHERE WidgetInstId = 6776) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6797) END FROM WidgetInst WHERE WidgetInstId = 6797) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6773) END FROM WidgetInst WHERE WidgetInstId = 6773)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6801;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6798) END FROM WidgetInst WHERE WidgetInstId = 6798) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6774) END FROM WidgetInst WHERE WidgetInstId = 6774)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6802;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6799) END FROM WidgetInst WHERE WidgetInstId = 6799) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6775) END FROM WidgetInst WHERE WidgetInstId = 6775)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6800) END FROM WidgetInst WHERE WidgetInstId = 6800) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6776) END FROM WidgetInst WHERE WidgetInstId = 6776)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6804;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6797) END FROM WidgetInst WHERE WidgetInstId = 6797) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6773) END FROM WidgetInst WHERE WidgetInstId = 6773)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6798) END FROM WidgetInst WHERE WidgetInstId = 6798) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6774) END FROM WidgetInst WHERE WidgetInstId = 6774)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6799) END FROM WidgetInst WHERE WidgetInstId = 6799) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6775) END FROM WidgetInst WHERE WidgetInstId = 6775)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6811;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6800) END FROM WidgetInst WHERE WidgetInstId = 6800) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6776) END FROM WidgetInst WHERE WidgetInstId = 6776)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6812;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6797) END FROM WidgetInst WHERE WidgetInstId = 6797) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6773) END FROM WidgetInst WHERE WidgetInstId = 6773)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6817;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6798) END FROM WidgetInst WHERE WidgetInstId = 6798) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6774) END FROM WidgetInst WHERE WidgetInstId = 6774)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6818;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6799) END FROM WidgetInst WHERE WidgetInstId = 6799) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6775) END FROM WidgetInst WHERE WidgetInstId = 6775)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6800) END FROM WidgetInst WHERE WidgetInstId = 6800) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6776) END FROM WidgetInst WHERE WidgetInstId = 6776)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6820;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 6134) END FROM WidgetInst WHERE WidgetInstId = 6134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 6135) END FROM WidgetInst WHERE WidgetInstId = 6135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 6136) END FROM WidgetInst WHERE WidgetInstId = 6136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6828;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6833) END FROM WidgetInst WHERE WidgetInstId = 6833) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6834) END FROM WidgetInst WHERE WidgetInstId = 6834) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6838;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6835) END FROM WidgetInst WHERE WidgetInstId = 6835) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6836) END FROM WidgetInst WHERE WidgetInstId = 6836) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6840;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6833) END FROM WidgetInst WHERE WidgetInstId = 6833) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6849;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6834) END FROM WidgetInst WHERE WidgetInstId = 6834) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6850;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6835) END FROM WidgetInst WHERE WidgetInstId = 6835) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6851;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6836) END FROM WidgetInst WHERE WidgetInstId = 6836) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6852;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6833) END FROM WidgetInst WHERE WidgetInstId = 6833) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6834) END FROM WidgetInst WHERE WidgetInstId = 6834) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6862;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6835) END FROM WidgetInst WHERE WidgetInstId = 6835) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6863;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6836) END FROM WidgetInst WHERE WidgetInstId = 6836) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6864;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6833) END FROM WidgetInst WHERE WidgetInstId = 6833) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6905;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6834) END FROM WidgetInst WHERE WidgetInstId = 6834) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6906;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6835) END FROM WidgetInst WHERE WidgetInstId = 6835) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6907;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6836) END FROM WidgetInst WHERE WidgetInstId = 6836) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6908;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6917;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 6134) END FROM WidgetInst WHERE WidgetInstId = 6134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6918;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 6135) END FROM WidgetInst WHERE WidgetInstId = 6135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6919;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 6136) END FROM WidgetInst WHERE WidgetInstId = 6136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6920;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6929) END FROM WidgetInst WHERE WidgetInstId = 6929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6930) END FROM WidgetInst WHERE WidgetInstId = 6930) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6931) END FROM WidgetInst WHERE WidgetInstId = 6931) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6932) END FROM WidgetInst WHERE WidgetInstId = 6932) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6929) END FROM WidgetInst WHERE WidgetInstId = 6929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6945;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6930) END FROM WidgetInst WHERE WidgetInstId = 6930) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6946;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6931) END FROM WidgetInst WHERE WidgetInstId = 6931) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6947;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6932) END FROM WidgetInst WHERE WidgetInstId = 6932) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6929) END FROM WidgetInst WHERE WidgetInstId = 6929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6957;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6930) END FROM WidgetInst WHERE WidgetInstId = 6930) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6931) END FROM WidgetInst WHERE WidgetInstId = 6931) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6959;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6932) END FROM WidgetInst WHERE WidgetInstId = 6932) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6929) END FROM WidgetInst WHERE WidgetInstId = 6929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6930) END FROM WidgetInst WHERE WidgetInstId = 6930) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6931) END FROM WidgetInst WHERE WidgetInstId = 6931) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 6932) END FROM WidgetInst WHERE WidgetInstId = 6932) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 7017) END FROM WidgetInst WHERE WidgetInstId = 7017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 7018) END FROM WidgetInst WHERE WidgetInstId = 7018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 7019) END FROM WidgetInst WHERE WidgetInstId = 7019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 7020) END FROM WidgetInst WHERE WidgetInstId = 7020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7024;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7017) END FROM WidgetInst WHERE WidgetInstId = 7017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7018) END FROM WidgetInst WHERE WidgetInstId = 7018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7030;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7019) END FROM WidgetInst WHERE WidgetInstId = 7019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7020) END FROM WidgetInst WHERE WidgetInstId = 7020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7032;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7017) END FROM WidgetInst WHERE WidgetInstId = 7017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7018) END FROM WidgetInst WHERE WidgetInstId = 7018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7019) END FROM WidgetInst WHERE WidgetInstId = 7019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7039;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7020) END FROM WidgetInst WHERE WidgetInstId = 7020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7017) END FROM WidgetInst WHERE WidgetInstId = 7017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7018) END FROM WidgetInst WHERE WidgetInstId = 7018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7046;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7019) END FROM WidgetInst WHERE WidgetInstId = 7019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7020) END FROM WidgetInst WHERE WidgetInstId = 7020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7017) END FROM WidgetInst WHERE WidgetInstId = 7017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7053;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7018) END FROM WidgetInst WHERE WidgetInstId = 7018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7054;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7019) END FROM WidgetInst WHERE WidgetInstId = 7019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7020) END FROM WidgetInst WHERE WidgetInstId = 7020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7056;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7017) END FROM WidgetInst WHERE WidgetInstId = 7017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7061;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7018) END FROM WidgetInst WHERE WidgetInstId = 7018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7062;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7019) END FROM WidgetInst WHERE WidgetInstId = 7019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7063;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7020) END FROM WidgetInst WHERE WidgetInstId = 7020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7064;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 5744) END FROM WidgetInst WHERE WidgetInstId = 5744)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 6134) END FROM WidgetInst WHERE WidgetInstId = 6134) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 5744) END FROM WidgetInst WHERE WidgetInstId = 5744)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 6135) END FROM WidgetInst WHERE WidgetInstId = 6135) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 5744) END FROM WidgetInst WHERE WidgetInstId = 5744)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7071;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 6136) END FROM WidgetInst WHERE WidgetInstId = 6136) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 5744) END FROM WidgetInst WHERE WidgetInstId = 5744)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 7077) END FROM WidgetInst WHERE WidgetInstId = 7077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7081;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 7078) END FROM WidgetInst WHERE WidgetInstId = 7078) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7082;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 7079) END FROM WidgetInst WHERE WidgetInstId = 7079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 7080) END FROM WidgetInst WHERE WidgetInstId = 7080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7084;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 7091;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 7091;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 7091;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 7091;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 7091;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 7091;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 7091) END FROM WidgetInst WHERE WidgetInstId = 7091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7092;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 7094) END FROM WidgetInst WHERE WidgetInstId = 7094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7095;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 7091) END FROM WidgetInst WHERE WidgetInstId = 7091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7097;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 5741) END FROM WidgetInst WHERE WidgetInstId = 5741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7103;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 5741) END FROM WidgetInst WHERE WidgetInstId = 5741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7106;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 7091) END FROM WidgetInst WHERE WidgetInstId = 7091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7109;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7111) END FROM WidgetInst WHERE WidgetInstId = 7111) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7112;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7111) END FROM WidgetInst WHERE WidgetInstId = 7111) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 7091) END FROM WidgetInst WHERE WidgetInstId = 7091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7118;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7120) END FROM WidgetInst WHERE WidgetInstId = 7120) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7121;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7120) END FROM WidgetInst WHERE WidgetInstId = 7120) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7124;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7120) END FROM WidgetInst WHERE WidgetInstId = 7120) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7127;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7091) END FROM WidgetInst WHERE WidgetInstId = 7091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7130;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7091) END FROM WidgetInst WHERE WidgetInstId = 7091) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7132) END FROM WidgetInst WHERE WidgetInstId = 7132)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7134) END FROM WidgetInst WHERE WidgetInstId = 7134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7134) END FROM WidgetInst WHERE WidgetInstId = 7134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7139;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7134) END FROM WidgetInst WHERE WidgetInstId = 7134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7142;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7134) END FROM WidgetInst WHERE WidgetInstId = 7134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7143;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7091) END FROM WidgetInst WHERE WidgetInstId = 7091) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7132) END FROM WidgetInst WHERE WidgetInstId = 7132)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7144;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7134) END FROM WidgetInst WHERE WidgetInstId = 7134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7134) END FROM WidgetInst WHERE WidgetInstId = 7134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7150) END FROM WidgetInst WHERE WidgetInstId = 7150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7151;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7134) END FROM WidgetInst WHERE WidgetInstId = 7134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7134) END FROM WidgetInst WHERE WidgetInstId = 7134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7154;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7150) END FROM WidgetInst WHERE WidgetInstId = 7150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7134) END FROM WidgetInst WHERE WidgetInstId = 7134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7157;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7134) END FROM WidgetInst WHERE WidgetInstId = 7134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7091) END FROM WidgetInst WHERE WidgetInstId = 7091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 7091) END FROM WidgetInst WHERE WidgetInstId = 7091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7195) END FROM WidgetInst WHERE WidgetInstId = 7195) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7195) END FROM WidgetInst WHERE WidgetInstId = 7195) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7198;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7195) END FROM WidgetInst WHERE WidgetInstId = 7195) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7200;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7091) END FROM WidgetInst WHERE WidgetInstId = 7091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7211) END FROM WidgetInst WHERE WidgetInstId = 7211) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7212;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7211) END FROM WidgetInst WHERE WidgetInstId = 7211) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7214;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7211) END FROM WidgetInst WHERE WidgetInstId = 7211) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 7091) END FROM WidgetInst WHERE WidgetInstId = 7091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7218;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7231) END FROM WidgetInst WHERE WidgetInstId = 7231) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7232;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7231) END FROM WidgetInst WHERE WidgetInstId = 7231) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7234;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7231) END FROM WidgetInst WHERE WidgetInstId = 7231) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7236;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 7091) END FROM WidgetInst WHERE WidgetInstId = 7091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7238;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7251) END FROM WidgetInst WHERE WidgetInstId = 7251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7252;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7251) END FROM WidgetInst WHERE WidgetInstId = 7251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7251) END FROM WidgetInst WHERE WidgetInstId = 7251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7256;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7251) END FROM WidgetInst WHERE WidgetInstId = 7251)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7258;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7251) END FROM WidgetInst WHERE WidgetInstId = 7251)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7260;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7251) END FROM WidgetInst WHERE WidgetInstId = 7251)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7262;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 7091) END FROM WidgetInst WHERE WidgetInstId = 7091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7264;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7266) END FROM WidgetInst WHERE WidgetInstId = 7266) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7267;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7266) END FROM WidgetInst WHERE WidgetInstId = 7266) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7270;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7266) END FROM WidgetInst WHERE WidgetInstId = 7266) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 7266) END FROM WidgetInst WHERE WidgetInstId = 7266) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7284;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 7091) END FROM WidgetInst WHERE WidgetInstId = 7091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7290) END FROM WidgetInst WHERE WidgetInstId = 7290) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7291;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7290) END FROM WidgetInst WHERE WidgetInstId = 7290) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7294;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7290) END FROM WidgetInst WHERE WidgetInstId = 7290) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7297;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 7290) END FROM WidgetInst WHERE WidgetInstId = 7290) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7308;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 7312) END FROM WidgetInst WHERE WidgetInstId = 7312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7312) END FROM WidgetInst WHERE WidgetInstId = 7312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7315;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7312) END FROM WidgetInst WHERE WidgetInstId = 7312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7317;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7312) END FROM WidgetInst WHERE WidgetInstId = 7312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7319;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7312) END FROM WidgetInst WHERE WidgetInstId = 7312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7321;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7312) END FROM WidgetInst WHERE WidgetInstId = 7312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7091) END FROM WidgetInst WHERE WidgetInstId = 7091) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 5744) END FROM WidgetInst WHERE WidgetInstId = 5744)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7325;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 7327) END FROM WidgetInst WHERE WidgetInstId = 7327) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7328;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 7358) END FROM WidgetInst WHERE WidgetInstId = 7358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7358) END FROM WidgetInst WHERE WidgetInstId = 7358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7367;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 7371) END FROM WidgetInst WHERE WidgetInstId = 7371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 7373) END FROM WidgetInst WHERE WidgetInstId = 7373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 7371) END FROM WidgetInst WHERE WidgetInstId = 7371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7383;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 7373) END FROM WidgetInst WHERE WidgetInstId = 7373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7371) END FROM WidgetInst WHERE WidgetInstId = 7371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7389;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7373) END FROM WidgetInst WHERE WidgetInstId = 7373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7391;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7371) END FROM WidgetInst WHERE WidgetInstId = 7371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7395;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7373) END FROM WidgetInst WHERE WidgetInstId = 7373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7371) END FROM WidgetInst WHERE WidgetInstId = 7371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7373) END FROM WidgetInst WHERE WidgetInstId = 7373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 7371) END FROM WidgetInst WHERE WidgetInstId = 7371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 7373) END FROM WidgetInst WHERE WidgetInstId = 7373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 7371) END FROM WidgetInst WHERE WidgetInstId = 7371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7413;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 7373) END FROM WidgetInst WHERE WidgetInstId = 7373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7421;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 7366) END FROM WidgetInst WHERE WidgetInstId = 7366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7437;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 7450) END FROM WidgetInst WHERE WidgetInstId = 7450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 7460) END FROM WidgetInst WHERE WidgetInstId = 7460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7461;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 7463) END FROM WidgetInst WHERE WidgetInstId = 7463) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 7468) END FROM WidgetInst WHERE WidgetInstId = 7468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7469;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 7468) END FROM WidgetInst WHERE WidgetInstId = 7468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7471;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 7460) END FROM WidgetInst WHERE WidgetInstId = 7460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7486;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 7500;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 7500;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 7500;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 7500;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 7500;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 7500;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 7500) END FROM WidgetInst WHERE WidgetInstId = 7500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7501;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 7503) END FROM WidgetInst WHERE WidgetInstId = 7503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7504;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 7500) END FROM WidgetInst WHERE WidgetInstId = 7500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7506;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7512;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7515;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 7500) END FROM WidgetInst WHERE WidgetInstId = 7500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7520) END FROM WidgetInst WHERE WidgetInstId = 7520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7521;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7520) END FROM WidgetInst WHERE WidgetInstId = 7520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 7500) END FROM WidgetInst WHERE WidgetInstId = 7500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7529) END FROM WidgetInst WHERE WidgetInstId = 7529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7529) END FROM WidgetInst WHERE WidgetInstId = 7529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7529) END FROM WidgetInst WHERE WidgetInstId = 7529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7500) END FROM WidgetInst WHERE WidgetInstId = 7500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7500) END FROM WidgetInst WHERE WidgetInstId = 7500) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7541) END FROM WidgetInst WHERE WidgetInstId = 7541)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7544;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7543) END FROM WidgetInst WHERE WidgetInstId = 7543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7547;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7543) END FROM WidgetInst WHERE WidgetInstId = 7543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7543) END FROM WidgetInst WHERE WidgetInstId = 7543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7543) END FROM WidgetInst WHERE WidgetInstId = 7543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7500) END FROM WidgetInst WHERE WidgetInstId = 7500) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7541) END FROM WidgetInst WHERE WidgetInstId = 7541)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7543) END FROM WidgetInst WHERE WidgetInstId = 7543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7543) END FROM WidgetInst WHERE WidgetInstId = 7543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7559) END FROM WidgetInst WHERE WidgetInstId = 7559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7543) END FROM WidgetInst WHERE WidgetInstId = 7543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7543) END FROM WidgetInst WHERE WidgetInstId = 7543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7559) END FROM WidgetInst WHERE WidgetInstId = 7559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7543) END FROM WidgetInst WHERE WidgetInstId = 7543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7543) END FROM WidgetInst WHERE WidgetInstId = 7543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7500) END FROM WidgetInst WHERE WidgetInstId = 7500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 7500) END FROM WidgetInst WHERE WidgetInstId = 7500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7604) END FROM WidgetInst WHERE WidgetInstId = 7604) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7604) END FROM WidgetInst WHERE WidgetInstId = 7604) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7607;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7604) END FROM WidgetInst WHERE WidgetInstId = 7604) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7500) END FROM WidgetInst WHERE WidgetInstId = 7500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7620) END FROM WidgetInst WHERE WidgetInstId = 7620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7621;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7620) END FROM WidgetInst WHERE WidgetInstId = 7620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7623;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7620) END FROM WidgetInst WHERE WidgetInstId = 7620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 7500) END FROM WidgetInst WHERE WidgetInstId = 7500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7640) END FROM WidgetInst WHERE WidgetInstId = 7640) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7640) END FROM WidgetInst WHERE WidgetInstId = 7640) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7640) END FROM WidgetInst WHERE WidgetInstId = 7640) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 7500) END FROM WidgetInst WHERE WidgetInstId = 7500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7660) END FROM WidgetInst WHERE WidgetInstId = 7660) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7661;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7660) END FROM WidgetInst WHERE WidgetInstId = 7660) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7663;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7660) END FROM WidgetInst WHERE WidgetInstId = 7660) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7666) END FROM WidgetInst WHERE WidgetInstId = 7666) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7660) END FROM WidgetInst WHERE WidgetInstId = 7660)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7666) END FROM WidgetInst WHERE WidgetInstId = 7666) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7660) END FROM WidgetInst WHERE WidgetInstId = 7660)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7666) END FROM WidgetInst WHERE WidgetInstId = 7666) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7660) END FROM WidgetInst WHERE WidgetInstId = 7660)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7671;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 7500) END FROM WidgetInst WHERE WidgetInstId = 7500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7673;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7675) END FROM WidgetInst WHERE WidgetInstId = 7675) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7676;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7675) END FROM WidgetInst WHERE WidgetInstId = 7675) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7675) END FROM WidgetInst WHERE WidgetInstId = 7675) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 7675) END FROM WidgetInst WHERE WidgetInstId = 7675) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7693;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 7500) END FROM WidgetInst WHERE WidgetInstId = 7500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7696;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7699) END FROM WidgetInst WHERE WidgetInstId = 7699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7700;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7699) END FROM WidgetInst WHERE WidgetInstId = 7699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7703;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7699) END FROM WidgetInst WHERE WidgetInstId = 7699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 7699) END FROM WidgetInst WHERE WidgetInstId = 7699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7717;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 7721) END FROM WidgetInst WHERE WidgetInstId = 7721) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7722;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7721) END FROM WidgetInst WHERE WidgetInstId = 7721) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7724;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7721) END FROM WidgetInst WHERE WidgetInstId = 7721) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7726;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7721) END FROM WidgetInst WHERE WidgetInstId = 7721) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7728;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7721) END FROM WidgetInst WHERE WidgetInstId = 7721) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7730;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7721) END FROM WidgetInst WHERE WidgetInstId = 7721) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 7736) END FROM WidgetInst WHERE WidgetInstId = 7736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7737;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 7747;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 7747;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 7747;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 7747;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 7747;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 7747;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 7748;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 7748;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 7748;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 7748;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 7748;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 7748;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 7749;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 7749;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 7749;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 7749;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 7749;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 7749;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 7750;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 7750;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 7750;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 7750;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 7750;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 7750;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 7747) END FROM WidgetInst WHERE WidgetInstId = 7747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7751;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 7748) END FROM WidgetInst WHERE WidgetInstId = 7748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7752;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 7750) END FROM WidgetInst WHERE WidgetInstId = 7750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 7759) END FROM WidgetInst WHERE WidgetInstId = 7759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 7760) END FROM WidgetInst WHERE WidgetInstId = 7760) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 7761) END FROM WidgetInst WHERE WidgetInstId = 7761) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 7762) END FROM WidgetInst WHERE WidgetInstId = 7762) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7766;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 7747) END FROM WidgetInst WHERE WidgetInstId = 7747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 7748) END FROM WidgetInst WHERE WidgetInstId = 7748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 7750) END FROM WidgetInst WHERE WidgetInstId = 7750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7774;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 7355) END FROM WidgetInst WHERE WidgetInstId = 7355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 7355) END FROM WidgetInst WHERE WidgetInstId = 7355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 7355) END FROM WidgetInst WHERE WidgetInstId = 7355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 7355) END FROM WidgetInst WHERE WidgetInstId = 7355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7798;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 7355) END FROM WidgetInst WHERE WidgetInstId = 7355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 7355) END FROM WidgetInst WHERE WidgetInstId = 7355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7808;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 7355) END FROM WidgetInst WHERE WidgetInstId = 7355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 7355) END FROM WidgetInst WHERE WidgetInstId = 7355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 7747) END FROM WidgetInst WHERE WidgetInstId = 7747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 7748) END FROM WidgetInst WHERE WidgetInstId = 7748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7820;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 7750) END FROM WidgetInst WHERE WidgetInstId = 7750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7822;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7827) END FROM WidgetInst WHERE WidgetInstId = 7827) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7828) END FROM WidgetInst WHERE WidgetInstId = 7828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7829) END FROM WidgetInst WHERE WidgetInstId = 7829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7830) END FROM WidgetInst WHERE WidgetInstId = 7830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7827) END FROM WidgetInst WHERE WidgetInstId = 7827) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7828) END FROM WidgetInst WHERE WidgetInstId = 7828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7844;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7829) END FROM WidgetInst WHERE WidgetInstId = 7829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7845;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7830) END FROM WidgetInst WHERE WidgetInstId = 7830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7846;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 7747) END FROM WidgetInst WHERE WidgetInstId = 7747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 7748) END FROM WidgetInst WHERE WidgetInstId = 7748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7856;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7857;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 7750) END FROM WidgetInst WHERE WidgetInstId = 7750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7858;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7863) END FROM WidgetInst WHERE WidgetInstId = 7863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7864) END FROM WidgetInst WHERE WidgetInstId = 7864) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7865) END FROM WidgetInst WHERE WidgetInstId = 7865) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7866) END FROM WidgetInst WHERE WidgetInstId = 7866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7863) END FROM WidgetInst WHERE WidgetInstId = 7863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7879;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7864) END FROM WidgetInst WHERE WidgetInstId = 7864) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7880;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7865) END FROM WidgetInst WHERE WidgetInstId = 7865) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7866) END FROM WidgetInst WHERE WidgetInstId = 7866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7882;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7863) END FROM WidgetInst WHERE WidgetInstId = 7863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7891;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7864) END FROM WidgetInst WHERE WidgetInstId = 7864) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7892;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7865) END FROM WidgetInst WHERE WidgetInstId = 7865) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7893;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7866) END FROM WidgetInst WHERE WidgetInstId = 7866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7747) END FROM WidgetInst WHERE WidgetInstId = 7747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7903;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7748) END FROM WidgetInst WHERE WidgetInstId = 7748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7904;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7905;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7750) END FROM WidgetInst WHERE WidgetInstId = 7750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7906;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7747) END FROM WidgetInst WHERE WidgetInstId = 7747) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7911) END FROM WidgetInst WHERE WidgetInstId = 7911)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7923;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7748) END FROM WidgetInst WHERE WidgetInstId = 7748) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7912) END FROM WidgetInst WHERE WidgetInstId = 7912)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7913) END FROM WidgetInst WHERE WidgetInstId = 7913)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7925;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7750) END FROM WidgetInst WHERE WidgetInstId = 7750) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7914) END FROM WidgetInst WHERE WidgetInstId = 7914)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7926;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7938;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7939;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7940;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7941;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7951;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7953;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7954;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7955;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7957;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7747) END FROM WidgetInst WHERE WidgetInstId = 7747) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7911) END FROM WidgetInst WHERE WidgetInstId = 7911)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7959;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7748) END FROM WidgetInst WHERE WidgetInstId = 7748) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7912) END FROM WidgetInst WHERE WidgetInstId = 7912)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7913) END FROM WidgetInst WHERE WidgetInstId = 7913)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7961;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7750) END FROM WidgetInst WHERE WidgetInstId = 7750) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7914) END FROM WidgetInst WHERE WidgetInstId = 7914)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7962;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7971;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7973;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7974;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7975;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7977;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7978;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7983) END FROM WidgetInst WHERE WidgetInstId = 7983) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7987;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7984) END FROM WidgetInst WHERE WidgetInstId = 7984) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7988;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7985) END FROM WidgetInst WHERE WidgetInstId = 7985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7989;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7986) END FROM WidgetInst WHERE WidgetInstId = 7986) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7995;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7996;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7997;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7998;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7999;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8000;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7983) END FROM WidgetInst WHERE WidgetInstId = 7983) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7984) END FROM WidgetInst WHERE WidgetInstId = 7984) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7985) END FROM WidgetInst WHERE WidgetInstId = 7985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8005;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7986) END FROM WidgetInst WHERE WidgetInstId = 7986) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8006;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8011;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8015;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8016;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8017;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8018;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7747) END FROM WidgetInst WHERE WidgetInstId = 7747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8019;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7748) END FROM WidgetInst WHERE WidgetInstId = 7748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8020;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7750) END FROM WidgetInst WHERE WidgetInstId = 7750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 7747) END FROM WidgetInst WHERE WidgetInstId = 7747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 7748) END FROM WidgetInst WHERE WidgetInstId = 7748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8032;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 7750) END FROM WidgetInst WHERE WidgetInstId = 7750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8163) END FROM WidgetInst WHERE WidgetInstId = 8163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8164) END FROM WidgetInst WHERE WidgetInstId = 8164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8165) END FROM WidgetInst WHERE WidgetInstId = 8165) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8169;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8166) END FROM WidgetInst WHERE WidgetInstId = 8166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8163) END FROM WidgetInst WHERE WidgetInstId = 8163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8175;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8164) END FROM WidgetInst WHERE WidgetInstId = 8164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8165) END FROM WidgetInst WHERE WidgetInstId = 8165) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8166) END FROM WidgetInst WHERE WidgetInstId = 8166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8178;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8163) END FROM WidgetInst WHERE WidgetInstId = 8163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8164) END FROM WidgetInst WHERE WidgetInstId = 8164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8184;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8165) END FROM WidgetInst WHERE WidgetInstId = 8165) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8185;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8166) END FROM WidgetInst WHERE WidgetInstId = 8166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8186;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7747) END FROM WidgetInst WHERE WidgetInstId = 7747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7748) END FROM WidgetInst WHERE WidgetInstId = 7748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7750) END FROM WidgetInst WHERE WidgetInstId = 7750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8227) END FROM WidgetInst WHERE WidgetInstId = 8227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8231;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8228) END FROM WidgetInst WHERE WidgetInstId = 8228) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8232;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8229) END FROM WidgetInst WHERE WidgetInstId = 8229) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8230) END FROM WidgetInst WHERE WidgetInstId = 8230) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8234;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8227) END FROM WidgetInst WHERE WidgetInstId = 8227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8228) END FROM WidgetInst WHERE WidgetInstId = 8228) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8240;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8229) END FROM WidgetInst WHERE WidgetInstId = 8229) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8230) END FROM WidgetInst WHERE WidgetInstId = 8230) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8242;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8227) END FROM WidgetInst WHERE WidgetInstId = 8227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8247;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8228) END FROM WidgetInst WHERE WidgetInstId = 8228) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8248;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8229) END FROM WidgetInst WHERE WidgetInstId = 8229) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8230) END FROM WidgetInst WHERE WidgetInstId = 8230) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8250;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 7747) END FROM WidgetInst WHERE WidgetInstId = 7747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 7748) END FROM WidgetInst WHERE WidgetInstId = 7748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8256;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8257;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 7750) END FROM WidgetInst WHERE WidgetInstId = 7750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8258;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8307) END FROM WidgetInst WHERE WidgetInstId = 8307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8308) END FROM WidgetInst WHERE WidgetInstId = 8308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8312;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8309) END FROM WidgetInst WHERE WidgetInstId = 8309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8310) END FROM WidgetInst WHERE WidgetInstId = 8310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8314;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8307) END FROM WidgetInst WHERE WidgetInstId = 8307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8319;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8308) END FROM WidgetInst WHERE WidgetInstId = 8308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8320;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8309) END FROM WidgetInst WHERE WidgetInstId = 8309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8321;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8310) END FROM WidgetInst WHERE WidgetInstId = 8310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8307) END FROM WidgetInst WHERE WidgetInstId = 8307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8327;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8308) END FROM WidgetInst WHERE WidgetInstId = 8308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8328;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8309) END FROM WidgetInst WHERE WidgetInstId = 8309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8329;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8310) END FROM WidgetInst WHERE WidgetInstId = 8310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8330;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 7747) END FROM WidgetInst WHERE WidgetInstId = 7747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8335;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 7748) END FROM WidgetInst WHERE WidgetInstId = 7748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8336;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8337;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 7750) END FROM WidgetInst WHERE WidgetInstId = 7750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8338;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8387) END FROM WidgetInst WHERE WidgetInstId = 8387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8391;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8388) END FROM WidgetInst WHERE WidgetInstId = 8388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8392;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8389) END FROM WidgetInst WHERE WidgetInstId = 8389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8390) END FROM WidgetInst WHERE WidgetInstId = 8390) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8394;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8387) END FROM WidgetInst WHERE WidgetInstId = 8387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8388) END FROM WidgetInst WHERE WidgetInstId = 8388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8389) END FROM WidgetInst WHERE WidgetInstId = 8389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8390) END FROM WidgetInst WHERE WidgetInstId = 8390) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8387) END FROM WidgetInst WHERE WidgetInstId = 8387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8388) END FROM WidgetInst WHERE WidgetInstId = 8388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8389) END FROM WidgetInst WHERE WidgetInstId = 8389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8390) END FROM WidgetInst WHERE WidgetInstId = 8390) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8411) END FROM WidgetInst WHERE WidgetInstId = 8411) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8387) END FROM WidgetInst WHERE WidgetInstId = 8387)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8412) END FROM WidgetInst WHERE WidgetInstId = 8412) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8388) END FROM WidgetInst WHERE WidgetInstId = 8388)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8413) END FROM WidgetInst WHERE WidgetInstId = 8413) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8389) END FROM WidgetInst WHERE WidgetInstId = 8389)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8414) END FROM WidgetInst WHERE WidgetInstId = 8414) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8390) END FROM WidgetInst WHERE WidgetInstId = 8390)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8411) END FROM WidgetInst WHERE WidgetInstId = 8411) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8387) END FROM WidgetInst WHERE WidgetInstId = 8387)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8412) END FROM WidgetInst WHERE WidgetInstId = 8412) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8388) END FROM WidgetInst WHERE WidgetInstId = 8388)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8413) END FROM WidgetInst WHERE WidgetInstId = 8413) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8389) END FROM WidgetInst WHERE WidgetInstId = 8389)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8414) END FROM WidgetInst WHERE WidgetInstId = 8414) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8390) END FROM WidgetInst WHERE WidgetInstId = 8390)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8411) END FROM WidgetInst WHERE WidgetInstId = 8411) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8387) END FROM WidgetInst WHERE WidgetInstId = 8387)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8412) END FROM WidgetInst WHERE WidgetInstId = 8412) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8388) END FROM WidgetInst WHERE WidgetInstId = 8388)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8413) END FROM WidgetInst WHERE WidgetInstId = 8413) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8389) END FROM WidgetInst WHERE WidgetInstId = 8389)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8414) END FROM WidgetInst WHERE WidgetInstId = 8414) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8390) END FROM WidgetInst WHERE WidgetInstId = 8390)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8434;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 7747) END FROM WidgetInst WHERE WidgetInstId = 7747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 7748) END FROM WidgetInst WHERE WidgetInstId = 7748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8440;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8441;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 7750) END FROM WidgetInst WHERE WidgetInstId = 7750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8442;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8452;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8453;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8450) END FROM WidgetInst WHERE WidgetInstId = 8450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8454;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8463;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8465;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8450) END FROM WidgetInst WHERE WidgetInstId = 8450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8466;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8476;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8450) END FROM WidgetInst WHERE WidgetInstId = 8450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8478;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8521;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8450) END FROM WidgetInst WHERE WidgetInstId = 8450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 7747) END FROM WidgetInst WHERE WidgetInstId = 7747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8531;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 7748) END FROM WidgetInst WHERE WidgetInstId = 7748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 7750) END FROM WidgetInst WHERE WidgetInstId = 7750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8543) END FROM WidgetInst WHERE WidgetInstId = 8543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8547;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8544) END FROM WidgetInst WHERE WidgetInstId = 8544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8545) END FROM WidgetInst WHERE WidgetInstId = 8545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8546) END FROM WidgetInst WHERE WidgetInstId = 8546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8543) END FROM WidgetInst WHERE WidgetInstId = 8543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8559;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8544) END FROM WidgetInst WHERE WidgetInstId = 8544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8545) END FROM WidgetInst WHERE WidgetInstId = 8545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8561;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8546) END FROM WidgetInst WHERE WidgetInstId = 8546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8543) END FROM WidgetInst WHERE WidgetInstId = 8543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8544) END FROM WidgetInst WHERE WidgetInstId = 8544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8545) END FROM WidgetInst WHERE WidgetInstId = 8545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8546) END FROM WidgetInst WHERE WidgetInstId = 8546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8543) END FROM WidgetInst WHERE WidgetInstId = 8543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8615;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8544) END FROM WidgetInst WHERE WidgetInstId = 8544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8616;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8545) END FROM WidgetInst WHERE WidgetInstId = 8545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8546) END FROM WidgetInst WHERE WidgetInstId = 8546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8618;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 8631) END FROM WidgetInst WHERE WidgetInstId = 8631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 8632) END FROM WidgetInst WHERE WidgetInstId = 8632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8636;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 8633) END FROM WidgetInst WHERE WidgetInstId = 8633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8637;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 8634) END FROM WidgetInst WHERE WidgetInstId = 8634) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8631) END FROM WidgetInst WHERE WidgetInstId = 8631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8632) END FROM WidgetInst WHERE WidgetInstId = 8632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8633) END FROM WidgetInst WHERE WidgetInstId = 8633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8634) END FROM WidgetInst WHERE WidgetInstId = 8634) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8646;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8631) END FROM WidgetInst WHERE WidgetInstId = 8631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8651;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8632) END FROM WidgetInst WHERE WidgetInstId = 8632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8652;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8633) END FROM WidgetInst WHERE WidgetInstId = 8633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8634) END FROM WidgetInst WHERE WidgetInstId = 8634) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8654;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8631) END FROM WidgetInst WHERE WidgetInstId = 8631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8632) END FROM WidgetInst WHERE WidgetInstId = 8632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8660;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8633) END FROM WidgetInst WHERE WidgetInstId = 8633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8661;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8634) END FROM WidgetInst WHERE WidgetInstId = 8634) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8662;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8631) END FROM WidgetInst WHERE WidgetInstId = 8631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8632) END FROM WidgetInst WHERE WidgetInstId = 8632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8668;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8633) END FROM WidgetInst WHERE WidgetInstId = 8633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8634) END FROM WidgetInst WHERE WidgetInstId = 8634) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8670;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8631) END FROM WidgetInst WHERE WidgetInstId = 8631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8675;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8632) END FROM WidgetInst WHERE WidgetInstId = 8632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8676;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8633) END FROM WidgetInst WHERE WidgetInstId = 8633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8634) END FROM WidgetInst WHERE WidgetInstId = 8634) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7747) END FROM WidgetInst WHERE WidgetInstId = 7747) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7358) END FROM WidgetInst WHERE WidgetInstId = 7358)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7748) END FROM WidgetInst WHERE WidgetInstId = 7748) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7358) END FROM WidgetInst WHERE WidgetInstId = 7358)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8684;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7358) END FROM WidgetInst WHERE WidgetInstId = 7358)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8685;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7750) END FROM WidgetInst WHERE WidgetInstId = 7750) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7358) END FROM WidgetInst WHERE WidgetInstId = 7358)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8686;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 8691) END FROM WidgetInst WHERE WidgetInstId = 8691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8695;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 8692) END FROM WidgetInst WHERE WidgetInstId = 8692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8696;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 8693) END FROM WidgetInst WHERE WidgetInstId = 8693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 8694) END FROM WidgetInst WHERE WidgetInstId = 8694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8698;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 8705;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 8705;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 8705;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 8705;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 8705;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 8705;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 8705) END FROM WidgetInst WHERE WidgetInstId = 8705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 8708) END FROM WidgetInst WHERE WidgetInstId = 8708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8709;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 8705) END FROM WidgetInst WHERE WidgetInstId = 8705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8711;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 7355) END FROM WidgetInst WHERE WidgetInstId = 7355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8717;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 7355) END FROM WidgetInst WHERE WidgetInstId = 7355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8720;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 8705) END FROM WidgetInst WHERE WidgetInstId = 8705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8723;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8725) END FROM WidgetInst WHERE WidgetInstId = 8725) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8726;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8725) END FROM WidgetInst WHERE WidgetInstId = 8725) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 8705) END FROM WidgetInst WHERE WidgetInstId = 8705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8734) END FROM WidgetInst WHERE WidgetInstId = 8734) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8734) END FROM WidgetInst WHERE WidgetInstId = 8734) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8738;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8734) END FROM WidgetInst WHERE WidgetInstId = 8734) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8741;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8705) END FROM WidgetInst WHERE WidgetInstId = 8705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8744;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8705) END FROM WidgetInst WHERE WidgetInstId = 8705) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8746) END FROM WidgetInst WHERE WidgetInstId = 8746)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8749;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8748) END FROM WidgetInst WHERE WidgetInstId = 8748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8752;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8748) END FROM WidgetInst WHERE WidgetInstId = 8748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8748) END FROM WidgetInst WHERE WidgetInstId = 8748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8756;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8748) END FROM WidgetInst WHERE WidgetInstId = 8748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8757;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8705) END FROM WidgetInst WHERE WidgetInstId = 8705) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8746) END FROM WidgetInst WHERE WidgetInstId = 8746)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8758;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8748) END FROM WidgetInst WHERE WidgetInstId = 8748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8748) END FROM WidgetInst WHERE WidgetInstId = 8748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8764) END FROM WidgetInst WHERE WidgetInstId = 8764) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8748) END FROM WidgetInst WHERE WidgetInstId = 8748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8748) END FROM WidgetInst WHERE WidgetInstId = 8748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8764) END FROM WidgetInst WHERE WidgetInstId = 8764) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8748) END FROM WidgetInst WHERE WidgetInstId = 8748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8748) END FROM WidgetInst WHERE WidgetInstId = 8748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8705) END FROM WidgetInst WHERE WidgetInstId = 8705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 8705) END FROM WidgetInst WHERE WidgetInstId = 8705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8809) END FROM WidgetInst WHERE WidgetInstId = 8809) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8809) END FROM WidgetInst WHERE WidgetInstId = 8809) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8812;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8809) END FROM WidgetInst WHERE WidgetInstId = 8809) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8814;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8705) END FROM WidgetInst WHERE WidgetInstId = 8705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8816;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8825) END FROM WidgetInst WHERE WidgetInstId = 8825) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8825) END FROM WidgetInst WHERE WidgetInstId = 8825) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8828;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8825) END FROM WidgetInst WHERE WidgetInstId = 8825) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8830;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 8705) END FROM WidgetInst WHERE WidgetInstId = 8705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8845) END FROM WidgetInst WHERE WidgetInstId = 8845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8846;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8845) END FROM WidgetInst WHERE WidgetInstId = 8845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8848;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8845) END FROM WidgetInst WHERE WidgetInstId = 8845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8850;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 8705) END FROM WidgetInst WHERE WidgetInstId = 8705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8852;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8865) END FROM WidgetInst WHERE WidgetInstId = 8865) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8865) END FROM WidgetInst WHERE WidgetInstId = 8865) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8865) END FROM WidgetInst WHERE WidgetInstId = 8865) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8871) END FROM WidgetInst WHERE WidgetInstId = 8871) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8865) END FROM WidgetInst WHERE WidgetInstId = 8865)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8872;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8871) END FROM WidgetInst WHERE WidgetInstId = 8871) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8865) END FROM WidgetInst WHERE WidgetInstId = 8865)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8874;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8871) END FROM WidgetInst WHERE WidgetInstId = 8871) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8865) END FROM WidgetInst WHERE WidgetInstId = 8865)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8876;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 8705) END FROM WidgetInst WHERE WidgetInstId = 8705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8878;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8880) END FROM WidgetInst WHERE WidgetInstId = 8880) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8880) END FROM WidgetInst WHERE WidgetInstId = 8880) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8880) END FROM WidgetInst WHERE WidgetInstId = 8880) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8887;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8880) END FROM WidgetInst WHERE WidgetInstId = 8880) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8898;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 8705) END FROM WidgetInst WHERE WidgetInstId = 8705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8901;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8904) END FROM WidgetInst WHERE WidgetInstId = 8904) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8905;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8904) END FROM WidgetInst WHERE WidgetInstId = 8904) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8908;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8904) END FROM WidgetInst WHERE WidgetInstId = 8904) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8911;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8904) END FROM WidgetInst WHERE WidgetInstId = 8904) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8922;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 8926) END FROM WidgetInst WHERE WidgetInstId = 8926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8927;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8926) END FROM WidgetInst WHERE WidgetInstId = 8926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8929;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8926) END FROM WidgetInst WHERE WidgetInstId = 8926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8931;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8926) END FROM WidgetInst WHERE WidgetInstId = 8926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8926) END FROM WidgetInst WHERE WidgetInstId = 8926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8926) END FROM WidgetInst WHERE WidgetInstId = 8926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8705) END FROM WidgetInst WHERE WidgetInstId = 8705) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7358) END FROM WidgetInst WHERE WidgetInstId = 7358)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8939;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 8941) END FROM WidgetInst WHERE WidgetInstId = 8941) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 8972) END FROM WidgetInst WHERE WidgetInstId = 8972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8973;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 8972) END FROM WidgetInst WHERE WidgetInstId = 8972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8975;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8981;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8989;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 8985) END FROM WidgetInst WHERE WidgetInstId = 8985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 8987) END FROM WidgetInst WHERE WidgetInstId = 8987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8993;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8995;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 8985) END FROM WidgetInst WHERE WidgetInstId = 8985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8997;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 8987) END FROM WidgetInst WHERE WidgetInstId = 8987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8999;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8985) END FROM WidgetInst WHERE WidgetInstId = 8985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8987) END FROM WidgetInst WHERE WidgetInstId = 8987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9005;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9007;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8985) END FROM WidgetInst WHERE WidgetInstId = 8985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9009;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8987) END FROM WidgetInst WHERE WidgetInstId = 8987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9011;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8985) END FROM WidgetInst WHERE WidgetInstId = 8985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9015;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8987) END FROM WidgetInst WHERE WidgetInstId = 8987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9017;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9019;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 8985) END FROM WidgetInst WHERE WidgetInstId = 8985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 8987) END FROM WidgetInst WHERE WidgetInstId = 8987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 8985) END FROM WidgetInst WHERE WidgetInstId = 8985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 8987) END FROM WidgetInst WHERE WidgetInstId = 8987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9039;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9041;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9043;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 8980) END FROM WidgetInst WHERE WidgetInstId = 8980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9051;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 9064) END FROM WidgetInst WHERE WidgetInstId = 9064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 9074) END FROM WidgetInst WHERE WidgetInstId = 9074) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 9077) END FROM WidgetInst WHERE WidgetInstId = 9077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9078;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 9082) END FROM WidgetInst WHERE WidgetInstId = 9082) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 9082) END FROM WidgetInst WHERE WidgetInstId = 9082) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9085;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 9074) END FROM WidgetInst WHERE WidgetInstId = 9074) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9100;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 9114;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 9114;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 9114;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 9114;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 9114;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 9114;


